package cn.kgc.controller;

import cn.kgc.client.HystrixClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/4/23
 * @Description:
 */
@RestController
@RequestMapping("open")
public class OpenFeignController {

    @Autowired
    private HystrixClient hystrixClient;

    @RequestMapping("m1")
    public String method1(Integer id){
        Map<String, Object> map = hystrixClient.method1(id);
        System.out.println("map = " + map);
        return "OpenFeignController ok" +map;
    }
}
